home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / programming / utilities / powertools.lha / powertools / include / PowerTools.h
Encoding:
C/C++ Source or Header  |  1994-04-05  |  2.7 KB  |  74 lines

  1. #ifndef POWERTOOLS_H
  2. #define POWERTOOLS_H
  3. /*
  4. **    $VER: PowerTools.h 1.1 (04.04.94)
  5. **
  6. **    C prototypes. For use with 32 bit integers only.
  7. **
  8. **    (C) Copyright 1994 Quadra Development, written by Bart Vanhaeren.
  9. **        All Rights Reserved
  10. */
  11. #ifndef  EXEC_TYPES_H
  12. #include <exec/types.h>
  13. #endif
  14. #ifndef  INTUITION_INTUITION_H
  15. #include <intuition/intuition.h>
  16. #include <exec/nodes.h>
  17. #endif
  18.  
  19. /* PowerTools flags */
  20. #define PT_USERT    1    /* Use ReqTools ©Nico François */
  21. #define PT_SAVEMODE    2    /* FileRequester is for save/write operation */
  22. #define PT_PERCENT      3       /* Render percent in middle of progressindicator */
  23.  
  24. /* protos */
  25. /* public */
  26. void pt_BusyPointer(struct Window *,BOOL);
  27. LONG pt_SimpleRequest(struct Window *,STRPTR,STRPTR,STRPTR,WORD);
  28. BOOL pt_FileRequest(struct Window *,STRPTR,STRPTR,STRPTR,WORD);
  29. void pt_SplitPath(STRPTR,STRPTR,STRPTR);
  30. struct pt_Progress *pt_AllocProgress(struct Window *,UWORD,UWORD,UWORD,UWORD,LONG,UWORD);
  31. void pt_UpdateProgress(struct pt_Progress *,LONG);
  32. void pt_FreeProgress(struct pt_Progress *,UWORD);
  33. struct pt_ListRequest *pt_AllocListRequest(struct Window *window,struct TextAttr *font,UWORD flags);
  34. WORD pt_ListRequest(struct pt_ListRequest *listreq,STRPTR title,struct MinList *list,UWORD flags);
  35. void pt_FreeListRequest(struct pt_ListRequest *listreq);
  36. /* private, internal use only */
  37. struct ReqToolsBase *pt_OpenReqTools(void);
  38. void pt_CloseReqTools(void);
  39.  
  40. /*****************************************************************************/
  41.  
  42. struct pt_Progress
  43. {
  44.    struct RastPort *pt_rp;     /* Pointer to a RastPort to render in */
  45.    UWORD pt_X;                 /* x-coord upper left */
  46.    UWORD pt_Y;                 /* y-coord upper left */
  47.    UWORD pt_height;            /* height of progress bar */
  48.    UWORD pt_width;             /* width of progress bar */
  49.    LONG  pt_max;               /* maximum value */
  50.    FLOAT pt_progress;          /* current value */
  51.    FLOAT pt_scale;             /* scale factor  */
  52.    UWORD pt_flags;             /* extra info */
  53. };
  54.  
  55. /* NOTE: ALL OF THE pt_Progress FIELDS ARE PRIVATE AND MAY ONLY BE CHANGED BY
  56.    THE POWERTOOLS FUNCTIONS ! */
  57.  
  58. /*****************************************************************************/
  59.  
  60. struct pt_ListRequest
  61. {
  62.    struct Window   *lr_wnd;     /* Pointer to parent Window */
  63.    struct Node     *lr_node;    /* Selected node after exit */
  64.    struct TextAttr *lr_font;    /* Optional font for ListView Gadget */
  65.    UWORD            lr_X;       /* x-coord upper left */
  66.    UWORD            lr_Y;       /* y-coord upper left */
  67.    UWORD            lr_height;  /* height of ListRequest */
  68.    UWORD            lr_width;   /* width of ListRequest */
  69. };
  70.  
  71. /******************************************************************************/
  72.  
  73. #endif     /* POWERTOOLS_H */
  74.